import logging

from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.views import APIView


# Create your views here.


# 得到日志输出对象logging
logger = logging.getLogger('erp')
class Hello(APIView):
    '''
    测试视图：以及logging日志
    '''
    def get(self,request):
        logger.debug('debug基本日志')
        logger.info('info基本日志')
        logger.error('error级别的日志')
        return Response({'message': 'OK'})
